package com.labor_management_system.Entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

/**
 * 
 * @TableName enterprises
 */
@TableName(value ="enterprises")
@Data
//企业单位
public class Enterprises implements Serializable {
    @TableId
    @JsonProperty("enterprisesId")
    private String enterprisesId;
    @JsonProperty("enterprisesName")
    private String enterprisesName;
    @JsonProperty("enterprisesCategory")
    private Integer enterprisesCategory;
    @JsonProperty("businessCreditCode")
    private String businessCreditCode;
    @JsonProperty("contact")
    private String contact;
    @JsonProperty("contactPhone")
    private String contactPhone;
    @JsonProperty("note")
    private String note;
    @JsonProperty("legalRepresentative")
    private String legalRepresentative;
    @JsonProperty("periodOfBusiness")
    private Long periodOfBusiness;
    @JsonProperty("proofOfBusiness")
    private String proofOfBusiness;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Enterprises other = (Enterprises) that;
        return (this.getEnterprisesId() == null ? other.getEnterprisesId() == null : this.getEnterprisesId().equals(other.getEnterprisesId()))
            && (this.getEnterprisesName() == null ? other.getEnterprisesName() == null : this.getEnterprisesName().equals(other.getEnterprisesName()))
            && (this.getEnterprisesCategory() == null ? other.getEnterprisesCategory() == null : this.getEnterprisesCategory().equals(other.getEnterprisesCategory()))
            && (this.getBusinessCreditCode() == null ? other.getBusinessCreditCode() == null : this.getBusinessCreditCode().equals(other.getBusinessCreditCode()))
            && (this.getContact() == null ? other.getContact() == null : this.getContact().equals(other.getContact()))
            && (this.getContactPhone() == null ? other.getContactPhone() == null : this.getContactPhone().equals(other.getContactPhone()))
            && (this.getNote() == null ? other.getNote() == null : this.getNote().equals(other.getNote()))
            && (this.getLegalRepresentative() == null ? other.getLegalRepresentative() == null : this.getLegalRepresentative().equals(other.getLegalRepresentative()))
            && (this.getPeriodOfBusiness() == null ? other.getPeriodOfBusiness() == null : this.getPeriodOfBusiness().equals(other.getPeriodOfBusiness()))
            && (this.getProofOfBusiness() == null ? other.getProofOfBusiness() == null : this.getProofOfBusiness().equals(other.getProofOfBusiness()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEnterprisesId() == null) ? 0 : getEnterprisesId().hashCode());
        result = prime * result + ((getEnterprisesName() == null) ? 0 : getEnterprisesName().hashCode());
        result = prime * result + ((getEnterprisesCategory() == null) ? 0 : getEnterprisesCategory().hashCode());
        result = prime * result + ((getBusinessCreditCode() == null) ? 0 : getBusinessCreditCode().hashCode());
        result = prime * result + ((getContact() == null) ? 0 : getContact().hashCode());
        result = prime * result + ((getContactPhone() == null) ? 0 : getContactPhone().hashCode());
        result = prime * result + ((getNote() == null) ? 0 : getNote().hashCode());
        result = prime * result + ((getLegalRepresentative() == null) ? 0 : getLegalRepresentative().hashCode());
        result = prime * result + ((getPeriodOfBusiness() == null) ? 0 : getPeriodOfBusiness().hashCode());
        result = prime * result + ((getProofOfBusiness() == null) ? 0 : getProofOfBusiness().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", enterprisesId=").append(enterprisesId);
        sb.append(", enterprisesName=").append(enterprisesName);
        sb.append(", enterprisesCategory=").append(enterprisesCategory);
        sb.append(", businessCreditCode=").append(businessCreditCode);
        sb.append(", contact=").append(contact);
        sb.append(", contactPhone=").append(contactPhone);
        sb.append(", note=").append(note);
        sb.append(", legalRepresentative=").append(legalRepresentative);
        sb.append(", periodOfBusiness=").append(periodOfBusiness);
        sb.append(", proofOfBusiness=").append(proofOfBusiness);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}